package cn.bigfire.wedesk.util;

import cn.hutool.crypto.SecureUtil;

public class AuthUtil {

    private static String md5(String password, String salt) {
        String md5_one = SecureUtil.md5(password + salt);
        String md5_two = SecureUtil.md5(md5_one + salt);
        String md5_three = SecureUtil.md5(md5_two + salt);
        return md5_three;
    }

    public static String authStr() {
        return md5(password, salt);
    }

    private static String password = "dahuoyzs";
    private static String salt = "wedesk";

    public static boolean auth(String authStr) {
        return md5(password, salt).equals(authStr);
    }

}
